import request from '@/utils/request'
// 所有角色获取API
export const AllRolesAPI = ({ page, pagesize }) => {
  return request({
    url: '/sys/role',
    params: {
      page, pagesize
    }
  })
}
// 添加角色
export const addRolesAPI = (data) => {
  return request({
    url: '/sys/role',
    method: 'POST',
    data
  })
}
// ID公司查询
export const companyAPI = (id) => {
  return request({
    url: `/company/${id}`
  })
}
// ID哈讯角色详情
export const getRolesAPI = (id) => {
  return request({
    url: `/sys/role/${id}`
  })
}
// ID更改角色信息
export const EditRolesAPI = (data) => {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'PUT',
    data
  })
}
// ID删除角色
export const delRolesAPI = (id) => {
  return request({
    url: `/sys/role/${id}`,
    method: 'DELETE'
  })
}
